package com.ysd.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ysd.entity.Books;
import com.ysd.service.BooksService;

@Controller
public class BooksxqController {
	@Autowired
	private BooksService booksService;

	@RequestMapping("getBooks")
	@ResponseBody
	public Books getBooks(Integer id) {
		Books p = booksService.findBooks(id);
		return p;
	}
}
